import { LAYOUT,newLAOUT, ReactiveGutter } from '../attr-widget'

export interface GRID extends LAYOUT {
  defaultSpan: number,
  align: 'top' | 'middle' | 'bottom'
  justify: 'start' | 'end' | 'center' | 'space-around' | 'space-between',
  wrap: boolean,
  gutter: [ReactiveGutter, ReactiveGutter]
  labelWidth: number
  labelAlign: 'left' | 'right'
}

export function newGRID(attr?:GRID):GRID{
  return Object.assign(
    newLAOUT(),
    {
      defaultSpan: 12,
      align: 'top',
      justify: 'start',
      wrap: true,
      gutter: [
        {xs:0,sm:0,md:0,lg:0,xl:0,xxl:0,xxxl:0},
        {xs:0,sm:0,md:0,lg:0,xl:0,xxl:0,xxxl:0}
      ],
      labelWidth: 100,
      labelAlign: 'left'
    },
    attr
  ) as GRID
}

export const STATUS_OPTIONS = [
  {value:'0',label:'隐藏'},
  {value:'1',label:'占位'},
  {value:'2',label:'可见'}
]